import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '物料编码',
    align:"center",
    dataIndex: 'goodsCode'
   },
   {
    title: '物料名称',
    align:"center",
    dataIndex: 'goodsName'
   },
   {
    title: '数量(旧)',
    align:"center",
    dataIndex: 'shelfOldCount'
   },
   {
    title: '数量(新)',
    align:"center",
    dataIndex: 'shelfNewCount'
   },
   {
    title: '单据号',
    align:"center",
    dataIndex: 'orderNum'
   },
   {
    title: '标签号(旧)',
    align:"center",
    dataIndex: 'oldBinCode'
   },
   {
    title: '标签号(新)',
    align:"center",
    dataIndex: 'newBinCode'
   },
   {
    title: '托盘码(旧)',
    align:"center",
    dataIndex: 'oldTrayCode'
   },
   {
    title: '托盘码(新)',
    align:"center",
    dataIndex: 'newTrayCode'
   },
   {
    title: '库位(旧)',
    align:"center",
    dataIndex: 'oldKwCode'
   },
   {
    title: '库位(新)',
    align:"center",
    dataIndex: 'newKwCode'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "物料编码",
      field: 'goodsCode',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "物料名称",
      field: 'goodsName',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "单据号",
      field: 'orderNum',
      component: 'Input',
      //colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '物料编码',
    field: 'goodsCode',
    component: 'Input',
  },
  {
    label: '物料名称',
    field: 'goodsName',
    component: 'Input',
  },
  {
    label: '数量(旧)',
    field: 'shelfOldCount',
    component: 'Input',
  },
  {
    label: '数量(新)',
    field: 'shelfNewCount',
    component: 'Input',
  },
  {
    label: '单据号',
    field: 'orderNum',
    component: 'Input',
  },
  {
    label: '入库id',
    field: 'stockId',
    component: 'Input',
  },
  {
    label: '标签号(旧)',
    field: 'oldBinCode',
    component: 'Input',
  },
  {
    label: '标签号(新)',
    field: 'newBinCode',
    component: 'Input',
  },
  {
    label: '托盘码(旧)',
    field: 'oldTrayCode',
    component: 'Input',
  },
  {
    label: '托盘码(新)',
    field: 'newTrayCode',
    component: 'Input',
  },
  {
    label: '库位(旧)',
    field: 'oldKwCode',
    component: 'Input',
  },
  {
    label: '库位(新)',
    field: 'newKwCode',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}